﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" CodeBehind="SearchPreContract.aspx.cs"
    Inherits="PreContractWeb.Task.SearchPreContract" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript" type="text/javascript">
        function document.onkeydown() {
            var e = event.srcElement;
            if (event.keyCode == 13) {

                document.all.ctl00$ContentPlaceHolder1$btnSearch.click();
                return false;
            }
        }  
    </script>
    <div style="text-align: center">
        <br />
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="panel_header">
                    <!--标题-->
                    查询条件(Search Condition)
                    <!--标题-->
                </td>
            </tr>
            <tr>
                <td class="panel_body">
                    <!--Panel Body-->
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <table style="width: 100%; height: 100%" border="0">
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            预合同编号:<br />
                                            Pre-Contract No:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtPreContractNo" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            合同状态:<br />
                                            Status:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlStatus" runat="server" allowempty="false">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            合同类型:<br />
                                            Category:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlType" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            合同类别:<br />
                                            Adjust:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlAdjust" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            大区:<br />
                                            Cluster:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlCluster" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            省:<br />
                                            Province:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlProvince" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" valign="middle">
                                            CAT:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlCAT" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            产品:<br />
                                            Product:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtProduct" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                        <td align="left" valign="middle">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            事业部:<br />
                                            PU:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlBD" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            BG:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlBG" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            正式合同号:<br />
                                            Advanced Contract:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtAdvancedContract" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            合同名称:
                                            <br />
                                            Contract Name:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtContractName" runat="server" allowempty="true" CssClass="cssText"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            ACR 编号:<br />
                                            ACR No:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtARCNo" runat="server" CssClass="cssText" allowempty="true" checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            关帐月份:<br />
                                            Trade Month:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlTradeMonth" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            承诺转正金额:
                                            <br />
                                            Cygnus ME:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlPromisedME" runat="server">
                                                <asp:ListItem>&gt;=</asp:ListItem>
                                                <asp:ListItem>&gt;</asp:ListItem>
                                                <asp:ListItem>=</asp:ListItem>
                                                <asp:ListItem>&lt;=</asp:ListItem>
                                                <asp:ListItem>&lt;</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:TextBox ID="txtPromisedME" runat="server" allowempty="true" checkmaster="checkNumber"
                                                CssClass="cssText" decimal="4" Max="99999999999" min="0" Width="55px">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            预计转正金额:
                                            <br />
                                            Orion ME:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlOrionME" runat="server">
                                                <asp:ListItem>&gt;=</asp:ListItem>
                                                <asp:ListItem>&gt;</asp:ListItem>
                                                <asp:ListItem>=</asp:ListItem>
                                                <asp:ListItem>&lt;=</asp:ListItem>
                                                <asp:ListItem>&lt;</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:TextBox ID="txtOrionME" runat="server" allowempty="true" checkmaster="checkNumber"
                                                CssClass="cssText" decimal="4" Max="99999999999" min="0" Width="55px">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            Orion 编号:<br />
                                            Orion No:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtOrionNo" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            客户名称:<br />
                                            Customer Name:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtCustomerName" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            申请人:
                                            <br />
                                            Apply Name:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtApplyName" runat="server" allowempty="true" CssClass="cssText"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            项目负责人:
                                            <br />
                                            Principal Name:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtPrincipalName" runat="server" allowempty="true" CssClass="cssText"
                                                checkmaster="checkbadwords">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            是否发货:<br />
                                            Delivered:
                                        </td>
                                        <td align="left" valign="middle">
                                            <table width="100%">
                                                <tr>
                                                    <td>
                                                        <asp:RadioButton ID="rdoDelivery_True" runat="server" Text="已发货" GroupName="Delivery" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:RadioButton ID="rdoDelivery_False" runat="server" Text="未发货" GroupName="Delivery" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td align="left" valign="middle">
                                            发货率%:<br />
                                            Delivery Percentage%:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="ddlDelivery" runat="server">
                                                <asp:ListItem>&gt;=</asp:ListItem>
                                                <asp:ListItem>&gt;</asp:ListItem>
                                                <asp:ListItem>=</asp:ListItem>
                                                <asp:ListItem>&lt;=</asp:ListItem>
                                                <asp:ListItem>&lt;</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:TextBox ID="txtDeliveryPercentage" runat="server" checkmaster="checkNumber"
                                                CssClass="cssText" decimal="2" Max="100" min="0" allowempty="true" Width="50">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle" style="display: none">
                                            ASB 或 Lucent:
                                            <br />
                                            ASB Or Lucent
                                        </td>
                                        <td align="left" valign="middle" style="display: none">
                                            <table width="100%">
                                                <tr>
                                                    <td>
                                                        <asp:RadioButton ID="rdoAll" runat="server" Text="All" GroupName="ASB" />
                                                    </td>
                                                    <td>
                                                        <asp:RadioButton ID="rdoASB" runat="server" Text="ASB" GroupName="ASB" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:RadioButton ID="rdoLucent" runat="server" Text="Lucent" GroupName="ASB" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            承诺转正时间:<br />
                                            Cygnus Date:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtPromisedDate_Start" runat="server" CssClass="cssPopdate" checkmaster="checkDate"
                                                allowempty="true" IconID="DateIcon01" Width="65px">
                                            </asp:TextBox><img id="DateIcon01" class="DateIcon" src="../Images/calendar_18.gif" />~
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtPromisedDate_End" runat="server" CssClass="cssPopdate" checkmaster="checkDate"
                                                allowempty="true" IconID="DateIcon02" Width="65px">
                                            </asp:TextBox><img id="DateIcon02" class="DateIcon" src="../Images/calendar_18.gif" />
                                        </td>
                                        <td align="left" valign="middle">
                                            预计转正时间:<br />
                                            Orion Date:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtSignDue_Start" runat="server" CssClass="cssPopdate" checkmaster="checkDate"
                                                allowempty="true" IconID="DateIcon03" Width="65px">
                                            </asp:TextBox><img id="DateIcon03" class="DateIcon" src="../Images/calendar_18.gif" />~
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtSignDue_End" runat="server" CssClass="cssPopdate" checkmaster="checkDate"
                                                allowempty="true" IconID="DateIcon04" Width="65px">
                                            </asp:TextBox><img id="DateIcon04" class="DateIcon" src="../Images/calendar_18.gif" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            最终转正时间:<br />
                                            Final Date:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtSignActual_Start" runat="server" CssClass="cssPopdate" checkmaster="checkDate"
                                                allowempty="true" IconID="DateIcon05" Width="65px">
                                            </asp:TextBox><img id="DateIcon05" class="DateIcon" src="../Images/calendar_18.gif" />~
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtSignActual_End" runat="server" CssClass="cssPopdate" checkmaster="checkDate"
                                                allowempty="true" IconID="DateIcon06" Width="65px">
                                            </asp:TextBox><img id="DateIcon06" class="DateIcon" src="../Images/calendar_18.gif" />
                                        </td>
                                        <td align="left" valign="middle">
                                            黑名单时间:<br />
                                            Black Date:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtBlackDate_Start" runat="server" allowempty="true" checkmaster="checkDate"
                                                CssClass="cssPopdate" IconID="DateIcon07" Width="65px">
                                            </asp:TextBox><img id="DateIcon07" class="DateIcon" src="../Images/calendar_18.gif" />~
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtBlackDate_End" runat="server" allowempty="true" checkmaster="checkDate"
                                                CssClass="cssPopdate" IconID="DateIcon08" Width="65px">
                                            </asp:TextBox><img id="DateIcon08" class="DateIcon" src="../Images/calendar_18.gif" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            订单确认时间:<br />
                                            ERP Accept:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtERPAccept_Start" runat="server" allowempty="true" AutoCompleteType="Disabled"
                                                checkmaster="checkDate" CssClass="cssPopdate" IconID="DateIcon09" Width="65px">
                                            </asp:TextBox><img id="DateIcon09" class="DateIcon" src="../Images/calendar_18.gif" />~
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtERPAccept_END" runat="server" allowempty="true" checkmaster="checkDate"
                                                CssClass="cssPopdate" IconID="DateIcon10" Width="65px">
                                            </asp:TextBox><img id="DateIcon10" class="DateIcon" src="../Images/calendar_18.gif" />
                                        </td>
                                        <td align="left" valign="middle">
                                            发货时间:<br />
                                            Delivery Date:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtDeliveryDate_Start" runat="server" allowempty="true" checkmaster="checkDate"
                                                CssClass="cssPopdate" IconID="DateIcon11" Width="65px">
                                            </asp:TextBox>
                                            <img id="DateIcon11" class="DateIcon" src="../Images/calendar_18.gif" />~
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtDeliveryDate_End" runat="server" allowempty="true" checkmaster="checkDate"
                                                CssClass="cssPopdate" IconID="DateIcon12" Width="65px">
                                            </asp:TextBox>
                                            <img id="DateIcon12" class="DateIcon" src="../Images/calendar_18.gif" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" style="width: 100px; text-align: left" valign="middle">
                                            &nbsp;逾期周数:<br />
                                            Delay Weeks:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:TextBox ID="txtDelayWeek_Start" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkNumber" Width="57px">
                                            </asp:TextBox>
                                            ~
                                        </td>
                                        <td align="left" valign="middle">
                                            &nbsp;
                                            <asp:TextBox ID="txtDelayWeek_End" runat="server" CssClass="cssText" allowempty="true"
                                                checkmaster="checkNumber" Width="57px">
                                            </asp:TextBox>
                                        </td>
                                        <td align="left" valign="middle">
                                            是否是 借/试等合同:<br />
                                            Is Loan/Try:
                                        </td>
                                        <td align="center" valign="middle">
                                            <asp:CheckBox ID="chkIsDelayTime" runat="server" />
                                        </td>
                                        <td align="right" valign="middle">
                                            <asp:Button ID="btnSearch" CssClass="bgButton" runat="server" Text="查询 (Search)"
                                                Width="100px" OnClick="btnSearch_Click" />&nbsp;&nbsp;&nbsp;
                                            <asp:Button ID="btnExport" CssClass="bgButton" runat="server" Text="导出(Export)" Width="100px"
                                                OnClick="btnExport_Click" ToolTip="如查询返回合同过多请直接导出到Excel!" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <input type="hidden" id="hidExport" runat="server" value="" />
    <iframe id="ifrmRpt" height="0" width="0" frameborder="0" visible="false"></iframe>
    <script language="javascript" type="text/javascript">

        var hidExp = document.getElementById("ctl00_ContentPlaceHolder1_hidExport");
        if (hidExp != null) {
            if (hidExp.value != "") {
                var url = hidExp.value;
                hidExp.value = "";

                var ifrm = document.getElementById('ifrmRpt');
                if (ifrm != null) {
                    ifrm.src = url;
                    alert("导出中请耐心等待，并请选择保存文件。\nPlease wait when exporting, and please save the file to local machine.");

                    //alert(window.document.readyState);


                }
            }
        }

    </script>
</asp:Content>
